<!-- 护理项目删除 禁用弹窗 -->
<template>
    <t-dialog v-model:visible="operateDialogvisible" :header="operateDialogHeader" :body="operateDialogBody"
        confirm-btn="确定" cancel-btn="取消" :on-confirm="onConfirm" :on-close="onclose" />
</template>

<script setup lang="ts">
import { ref, watch } from 'vue'
import { MessagePlugin, ValidateResultContext } from 'tdesign-vue-next'
//声明父组件传递过来的属性
const props = defineProps({
    operateDialogvisible: {
        type: Boolean,
        default: () => {
            return false;
        }
    },
    operateDialogHeader: {
        type: String,
        default: () => {
            return '';
        }
    },
    operateDialogBody: {
        type: String,
        default: () => {
            return '';
        }
    },

})
const operateDialogvisible = ref(false);


watch(() => props.operateDialogvisible, (newValue, oldValue) => {
    operateDialogvisible.value = newValue;
});

//声明父组件传递过来的方法
const emit = defineEmits(['onConfirm', 'onclose'])
const onConfirm = () => {
    emit('onConfirm');

}
const onclose = () => {
    emit('onclose');

}

</script>